@extends('home.layouts._center')
@section('content')
    <div class="mod_main">
        <div class="mt">
            <h3>我的订单</h3>
            <div class="extra-r"><a href="{{route('home.center.allOrder')}}">查看全部订单</a></div>
        </div>
        <div class="tb_order">
            <table width="100%">
              @foreach($orders as $order)
                <tbody class="fore0">
                <tr>
                    <td><div class="img-list"><a href="{{route('home.content',$order->orderDetails[0]->good)}}"><img src="{{$order->orderDetails[0]->good->picture[0]}}" title=""></a></div></td>
                    <td>
                        <a href="{{route('home.content',$order->orderDetails[0]->good)}}">{{$order->orderDetails[0]->good->title}}</a>
                        【订单号：{{$order->order_num}}】
                    </td>
                    <td><div class="u-name">{{$order->address->linkname}}</div></td>
                    <td>￥{{$order->total_price}}<br>在线支付</td>
                    <td><span class="ftx-03">{{$order->created_at}}</span></td>
                    <td><span class="ftx-03">{{$order['status']}}</span></td>
                    <td class="order-doi"><a  href="{{route('home.center.myOrder')}}" >查看</a></td>
                </tr>
                </tbody>
               @endforeach
            </table>
        </div>
    </div>
    <div class="mod_main mod_main1">
        <div class="mt">
            <h3>我收藏的商品</h3>
            <div class="extra-r"><a href="{{route('home.collect.myCollect')}}">查看更多</a></div>
        </div>
        <div class="follow">
            <ul>
                @foreach($collects as $collect)
                <li><a class="follow_tup_kuang" href="{{route('home.content',$collect->good)}}"><img src="{{$collect->good->picture[0]}}"></a><p>￥ {{$collect->good->price}}</p></li>
                 @endforeach
            </ul>
        </div>
    </div>
    <div class="mod_main mod_main1 mod_main2">
        <div class="mt">
            <h3>商城推荐商品</h3>
        </div>
        <div class="follow">
            <ul>
              @foreach($commend_goods as $commend_good)
                <li>
                    <a class="follow_tup_kuang" href="{{route('home.content',$commend_good)}}"><img src="{{$commend_good['picture'][0]}}"></a>
                    <p><a href="{{route('home.content',$commend_good)}}">{{$commend_good['title']}}<span>(已有{{$commend_good['collect_num']}}人收藏)</span></a><p class="p_color_1">￥{{$commend_good['price']}}</p></p>
                </li>
               @endforeach
            </ul>
        </div>
    </div>
@endsection
